(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
lessElements(l, t) → lessE(l, t, 0)
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0
length(cons(n, l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, n, t2)) → append(toList(t1), cons(n, toList(t2)))
append(nil, l2) → l2
append(cons(n, l1), l2) → cons(n, append(l1, l2))
le(s(n), 0) → false
le(0, m) → true
le(s(n), s(m)) → le(n, m)
a → c
a → d
Rewrite Strategy: FULL
(1) DecreasingLoopProof (EQUIVALENT transformation)
The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
length(cons(n, l)) →+ s(length(l))
gives rise to a decreasing loop by considering the right hand sides subterm at position [0].
The pumping substitution is [l / cons(n, l)].
The result substitution is [ ].
(2) BOUNDS(n^1, INF)
(3) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(n, l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, n, t2)) → append(toList(t1), cons(n, toList(t2)))
append(nil, l2) → l2
append(cons(n, l1), l2) → cons(n, append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
a → c
a → d
S is empty.
Rewrite Strategy: FULL
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
TRS:
Rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(n, l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, n, t2)) → append(toList(t1), cons(n, toList(t2)))
append(nil, l2) → l2
append(cons(n, l1), l2) → cons(n, append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
a → c
a → d
Types:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: a → nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → a → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_a4_0 :: a
hole_c:d5_0 :: c:d
gen_nil:cons:leaf:node6_0 :: Nat → nil:cons:leaf:node
gen_0':s7_0 :: Nat → 0':s
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
lessE,
le,
length,
toList,
appendThey will be analysed ascendingly in the following order:
le < lessE
length < lessE
toList < lessE
append < toList
(8) Obligation:
TRS:
Rules:
lessElements(
l,
t) →
lessE(
l,
t,
0')
lessE(
l,
t,
n) →
if(
le(
length(
l),
n),
le(
length(
toList(
t)),
n),
l,
t,
n)
if(
true,
b,
l,
t,
n) →
lif(
false,
true,
l,
t,
n) →
tif(
false,
false,
l,
t,
n) →
lessE(
l,
t,
s(
n))
length(
nil) →
0'length(
cons(
n,
l)) →
s(
length(
l))
toList(
leaf) →
niltoList(
node(
t1,
n,
t2)) →
append(
toList(
t1),
cons(
n,
toList(
t2)))
append(
nil,
l2) →
l2append(
cons(
n,
l1),
l2) →
cons(
n,
append(
l1,
l2))
le(
s(
n),
0') →
falsele(
0',
m) →
truele(
s(
n),
s(
m)) →
le(
n,
m)
a →
ca →
dTypes:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: a → nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → a → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_a4_0 :: a
hole_c:d5_0 :: c:d
gen_nil:cons:leaf:node6_0 :: Nat → nil:cons:leaf:node
gen_0':s7_0 :: Nat → 0':s
Generator Equations:
gen_nil:cons:leaf:node6_0(0) ⇔ nil
gen_nil:cons:leaf:node6_0(+(x, 1)) ⇔ cons(hole_a4_0, gen_nil:cons:leaf:node6_0(x))
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))
The following defined symbols remain to be analysed:
le, lessE, length, toList, append
They will be analysed ascendingly in the following order:
le < lessE
length < lessE
toList < lessE
append < toList
(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
le(
gen_0':s7_0(
+(
1,
n9_0)),
gen_0':s7_0(
n9_0)) →
false, rt ∈ Ω(1 + n9
0)
Induction Base:
le(gen_0':s7_0(+(1, 0)), gen_0':s7_0(0)) →RΩ(1)
false
Induction Step:
le(gen_0':s7_0(+(1, +(n9_0, 1))), gen_0':s7_0(+(n9_0, 1))) →RΩ(1)
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) →IH
false
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(10) Complex Obligation (BEST)
(11) Obligation:
TRS:
Rules:
lessElements(
l,
t) →
lessE(
l,
t,
0')
lessE(
l,
t,
n) →
if(
le(
length(
l),
n),
le(
length(
toList(
t)),
n),
l,
t,
n)
if(
true,
b,
l,
t,
n) →
lif(
false,
true,
l,
t,
n) →
tif(
false,
false,
l,
t,
n) →
lessE(
l,
t,
s(
n))
length(
nil) →
0'length(
cons(
n,
l)) →
s(
length(
l))
toList(
leaf) →
niltoList(
node(
t1,
n,
t2)) →
append(
toList(
t1),
cons(
n,
toList(
t2)))
append(
nil,
l2) →
l2append(
cons(
n,
l1),
l2) →
cons(
n,
append(
l1,
l2))
le(
s(
n),
0') →
falsele(
0',
m) →
truele(
s(
n),
s(
m)) →
le(
n,
m)
a →
ca →
dTypes:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: a → nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → a → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_a4_0 :: a
hole_c:d5_0 :: c:d
gen_nil:cons:leaf:node6_0 :: Nat → nil:cons:leaf:node
gen_0':s7_0 :: Nat → 0':s
Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
Generator Equations:
gen_nil:cons:leaf:node6_0(0) ⇔ nil
gen_nil:cons:leaf:node6_0(+(x, 1)) ⇔ cons(hole_a4_0, gen_nil:cons:leaf:node6_0(x))
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))
The following defined symbols remain to be analysed:
length, lessE, toList, append
They will be analysed ascendingly in the following order:
length < lessE
toList < lessE
append < toList
(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
length(
gen_nil:cons:leaf:node6_0(
n320_0)) →
gen_0':s7_0(
n320_0), rt ∈ Ω(1 + n320
0)
Induction Base:
length(gen_nil:cons:leaf:node6_0(0)) →RΩ(1)
0'
Induction Step:
length(gen_nil:cons:leaf:node6_0(+(n320_0, 1))) →RΩ(1)
s(length(gen_nil:cons:leaf:node6_0(n320_0))) →IH
s(gen_0':s7_0(c321_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(13) Complex Obligation (BEST)
(14) Obligation:
TRS:
Rules:
lessElements(
l,
t) →
lessE(
l,
t,
0')
lessE(
l,
t,
n) →
if(
le(
length(
l),
n),
le(
length(
toList(
t)),
n),
l,
t,
n)
if(
true,
b,
l,
t,
n) →
lif(
false,
true,
l,
t,
n) →
tif(
false,
false,
l,
t,
n) →
lessE(
l,
t,
s(
n))
length(
nil) →
0'length(
cons(
n,
l)) →
s(
length(
l))
toList(
leaf) →
niltoList(
node(
t1,
n,
t2)) →
append(
toList(
t1),
cons(
n,
toList(
t2)))
append(
nil,
l2) →
l2append(
cons(
n,
l1),
l2) →
cons(
n,
append(
l1,
l2))
le(
s(
n),
0') →
falsele(
0',
m) →
truele(
s(
n),
s(
m)) →
le(
n,
m)
a →
ca →
dTypes:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: a → nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → a → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_a4_0 :: a
hole_c:d5_0 :: c:d
gen_nil:cons:leaf:node6_0 :: Nat → nil:cons:leaf:node
gen_0':s7_0 :: Nat → 0':s
Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
length(gen_nil:cons:leaf:node6_0(n320_0)) → gen_0':s7_0(n320_0), rt ∈ Ω(1 + n3200)
Generator Equations:
gen_nil:cons:leaf:node6_0(0) ⇔ nil
gen_nil:cons:leaf:node6_0(+(x, 1)) ⇔ cons(hole_a4_0, gen_nil:cons:leaf:node6_0(x))
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))
The following defined symbols remain to be analysed:
append, lessE, toList
They will be analysed ascendingly in the following order:
toList < lessE
append < toList
(15) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
append(
gen_nil:cons:leaf:node6_0(
n594_0),
gen_nil:cons:leaf:node6_0(
b)) →
gen_nil:cons:leaf:node6_0(
+(
n594_0,
b)), rt ∈ Ω(1 + n594
0)
Induction Base:
append(gen_nil:cons:leaf:node6_0(0), gen_nil:cons:leaf:node6_0(b)) →RΩ(1)
gen_nil:cons:leaf:node6_0(b)
Induction Step:
append(gen_nil:cons:leaf:node6_0(+(n594_0, 1)), gen_nil:cons:leaf:node6_0(b)) →RΩ(1)
cons(hole_a4_0, append(gen_nil:cons:leaf:node6_0(n594_0), gen_nil:cons:leaf:node6_0(b))) →IH
cons(hole_a4_0, gen_nil:cons:leaf:node6_0(+(b, c595_0)))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(16) Complex Obligation (BEST)
(17) Obligation:
TRS:
Rules:
lessElements(
l,
t) →
lessE(
l,
t,
0')
lessE(
l,
t,
n) →
if(
le(
length(
l),
n),
le(
length(
toList(
t)),
n),
l,
t,
n)
if(
true,
b,
l,
t,
n) →
lif(
false,
true,
l,
t,
n) →
tif(
false,
false,
l,
t,
n) →
lessE(
l,
t,
s(
n))
length(
nil) →
0'length(
cons(
n,
l)) →
s(
length(
l))
toList(
leaf) →
niltoList(
node(
t1,
n,
t2)) →
append(
toList(
t1),
cons(
n,
toList(
t2)))
append(
nil,
l2) →
l2append(
cons(
n,
l1),
l2) →
cons(
n,
append(
l1,
l2))
le(
s(
n),
0') →
falsele(
0',
m) →
truele(
s(
n),
s(
m)) →
le(
n,
m)
a →
ca →
dTypes:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: a → nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → a → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_a4_0 :: a
hole_c:d5_0 :: c:d
gen_nil:cons:leaf:node6_0 :: Nat → nil:cons:leaf:node
gen_0':s7_0 :: Nat → 0':s
Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
length(gen_nil:cons:leaf:node6_0(n320_0)) → gen_0':s7_0(n320_0), rt ∈ Ω(1 + n3200)
append(gen_nil:cons:leaf:node6_0(n594_0), gen_nil:cons:leaf:node6_0(b)) → gen_nil:cons:leaf:node6_0(+(n594_0, b)), rt ∈ Ω(1 + n5940)
Generator Equations:
gen_nil:cons:leaf:node6_0(0) ⇔ nil
gen_nil:cons:leaf:node6_0(+(x, 1)) ⇔ cons(hole_a4_0, gen_nil:cons:leaf:node6_0(x))
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))
The following defined symbols remain to be analysed:
toList, lessE
They will be analysed ascendingly in the following order:
toList < lessE
(18) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol toList.
(19) Obligation:
TRS:
Rules:
lessElements(
l,
t) →
lessE(
l,
t,
0')
lessE(
l,
t,
n) →
if(
le(
length(
l),
n),
le(
length(
toList(
t)),
n),
l,
t,
n)
if(
true,
b,
l,
t,
n) →
lif(
false,
true,
l,
t,
n) →
tif(
false,
false,
l,
t,
n) →
lessE(
l,
t,
s(
n))
length(
nil) →
0'length(
cons(
n,
l)) →
s(
length(
l))
toList(
leaf) →
niltoList(
node(
t1,
n,
t2)) →
append(
toList(
t1),
cons(
n,
toList(
t2)))
append(
nil,
l2) →
l2append(
cons(
n,
l1),
l2) →
cons(
n,
append(
l1,
l2))
le(
s(
n),
0') →
falsele(
0',
m) →
truele(
s(
n),
s(
m)) →
le(
n,
m)
a →
ca →
dTypes:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: a → nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → a → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_a4_0 :: a
hole_c:d5_0 :: c:d
gen_nil:cons:leaf:node6_0 :: Nat → nil:cons:leaf:node
gen_0':s7_0 :: Nat → 0':s
Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
length(gen_nil:cons:leaf:node6_0(n320_0)) → gen_0':s7_0(n320_0), rt ∈ Ω(1 + n3200)
append(gen_nil:cons:leaf:node6_0(n594_0), gen_nil:cons:leaf:node6_0(b)) → gen_nil:cons:leaf:node6_0(+(n594_0, b)), rt ∈ Ω(1 + n5940)
Generator Equations:
gen_nil:cons:leaf:node6_0(0) ⇔ nil
gen_nil:cons:leaf:node6_0(+(x, 1)) ⇔ cons(hole_a4_0, gen_nil:cons:leaf:node6_0(x))
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))
The following defined symbols remain to be analysed:
lessE
(20) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol lessE.
(21) Obligation:
TRS:
Rules:
lessElements(
l,
t) →
lessE(
l,
t,
0')
lessE(
l,
t,
n) →
if(
le(
length(
l),
n),
le(
length(
toList(
t)),
n),
l,
t,
n)
if(
true,
b,
l,
t,
n) →
lif(
false,
true,
l,
t,
n) →
tif(
false,
false,
l,
t,
n) →
lessE(
l,
t,
s(
n))
length(
nil) →
0'length(
cons(
n,
l)) →
s(
length(
l))
toList(
leaf) →
niltoList(
node(
t1,
n,
t2)) →
append(
toList(
t1),
cons(
n,
toList(
t2)))
append(
nil,
l2) →
l2append(
cons(
n,
l1),
l2) →
cons(
n,
append(
l1,
l2))
le(
s(
n),
0') →
falsele(
0',
m) →
truele(
s(
n),
s(
m)) →
le(
n,
m)
a →
ca →
dTypes:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: a → nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → a → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_a4_0 :: a
hole_c:d5_0 :: c:d
gen_nil:cons:leaf:node6_0 :: Nat → nil:cons:leaf:node
gen_0':s7_0 :: Nat → 0':s
Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
length(gen_nil:cons:leaf:node6_0(n320_0)) → gen_0':s7_0(n320_0), rt ∈ Ω(1 + n3200)
append(gen_nil:cons:leaf:node6_0(n594_0), gen_nil:cons:leaf:node6_0(b)) → gen_nil:cons:leaf:node6_0(+(n594_0, b)), rt ∈ Ω(1 + n5940)
Generator Equations:
gen_nil:cons:leaf:node6_0(0) ⇔ nil
gen_nil:cons:leaf:node6_0(+(x, 1)) ⇔ cons(hole_a4_0, gen_nil:cons:leaf:node6_0(x))
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))
No more defined symbols left to analyse.
(22) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
(23) BOUNDS(n^1, INF)
(24) Obligation:
TRS:
Rules:
lessElements(
l,
t) →
lessE(
l,
t,
0')
lessE(
l,
t,
n) →
if(
le(
length(
l),
n),
le(
length(
toList(
t)),
n),
l,
t,
n)
if(
true,
b,
l,
t,
n) →
lif(
false,
true,
l,
t,
n) →
tif(
false,
false,
l,
t,
n) →
lessE(
l,
t,
s(
n))
length(
nil) →
0'length(
cons(
n,
l)) →
s(
length(
l))
toList(
leaf) →
niltoList(
node(
t1,
n,
t2)) →
append(
toList(
t1),
cons(
n,
toList(
t2)))
append(
nil,
l2) →
l2append(
cons(
n,
l1),
l2) →
cons(
n,
append(
l1,
l2))
le(
s(
n),
0') →
falsele(
0',
m) →
truele(
s(
n),
s(
m)) →
le(
n,
m)
a →
ca →
dTypes:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: a → nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → a → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_a4_0 :: a
hole_c:d5_0 :: c:d
gen_nil:cons:leaf:node6_0 :: Nat → nil:cons:leaf:node
gen_0':s7_0 :: Nat → 0':s
Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
length(gen_nil:cons:leaf:node6_0(n320_0)) → gen_0':s7_0(n320_0), rt ∈ Ω(1 + n3200)
append(gen_nil:cons:leaf:node6_0(n594_0), gen_nil:cons:leaf:node6_0(b)) → gen_nil:cons:leaf:node6_0(+(n594_0, b)), rt ∈ Ω(1 + n5940)
Generator Equations:
gen_nil:cons:leaf:node6_0(0) ⇔ nil
gen_nil:cons:leaf:node6_0(+(x, 1)) ⇔ cons(hole_a4_0, gen_nil:cons:leaf:node6_0(x))
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))
No more defined symbols left to analyse.
(25) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
(26) BOUNDS(n^1, INF)
(27) Obligation:
TRS:
Rules:
lessElements(
l,
t) →
lessE(
l,
t,
0')
lessE(
l,
t,
n) →
if(
le(
length(
l),
n),
le(
length(
toList(
t)),
n),
l,
t,
n)
if(
true,
b,
l,
t,
n) →
lif(
false,
true,
l,
t,
n) →
tif(
false,
false,
l,
t,
n) →
lessE(
l,
t,
s(
n))
length(
nil) →
0'length(
cons(
n,
l)) →
s(
length(
l))
toList(
leaf) →
niltoList(
node(
t1,
n,
t2)) →
append(
toList(
t1),
cons(
n,
toList(
t2)))
append(
nil,
l2) →
l2append(
cons(
n,
l1),
l2) →
cons(
n,
append(
l1,
l2))
le(
s(
n),
0') →
falsele(
0',
m) →
truele(
s(
n),
s(
m)) →
le(
n,
m)
a →
ca →
dTypes:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: a → nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → a → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_a4_0 :: a
hole_c:d5_0 :: c:d
gen_nil:cons:leaf:node6_0 :: Nat → nil:cons:leaf:node
gen_0':s7_0 :: Nat → 0':s
Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
length(gen_nil:cons:leaf:node6_0(n320_0)) → gen_0':s7_0(n320_0), rt ∈ Ω(1 + n3200)
Generator Equations:
gen_nil:cons:leaf:node6_0(0) ⇔ nil
gen_nil:cons:leaf:node6_0(+(x, 1)) ⇔ cons(hole_a4_0, gen_nil:cons:leaf:node6_0(x))
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))
No more defined symbols left to analyse.
(28) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
(29) BOUNDS(n^1, INF)
(30) Obligation:
TRS:
Rules:
lessElements(
l,
t) →
lessE(
l,
t,
0')
lessE(
l,
t,
n) →
if(
le(
length(
l),
n),
le(
length(
toList(
t)),
n),
l,
t,
n)
if(
true,
b,
l,
t,
n) →
lif(
false,
true,
l,
t,
n) →
tif(
false,
false,
l,
t,
n) →
lessE(
l,
t,
s(
n))
length(
nil) →
0'length(
cons(
n,
l)) →
s(
length(
l))
toList(
leaf) →
niltoList(
node(
t1,
n,
t2)) →
append(
toList(
t1),
cons(
n,
toList(
t2)))
append(
nil,
l2) →
l2append(
cons(
n,
l1),
l2) →
cons(
n,
append(
l1,
l2))
le(
s(
n),
0') →
falsele(
0',
m) →
truele(
s(
n),
s(
m)) →
le(
n,
m)
a →
ca →
dTypes:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: a → nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → a → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_a4_0 :: a
hole_c:d5_0 :: c:d
gen_nil:cons:leaf:node6_0 :: Nat → nil:cons:leaf:node
gen_0':s7_0 :: Nat → 0':s
Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
Generator Equations:
gen_nil:cons:leaf:node6_0(0) ⇔ nil
gen_nil:cons:leaf:node6_0(+(x, 1)) ⇔ cons(hole_a4_0, gen_nil:cons:leaf:node6_0(x))
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))
No more defined symbols left to analyse.
(31) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
(32) BOUNDS(n^1, INF)